<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../resources/common/page/sessionovertime.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<base href="<%=basePath%>">
    <title>组织架构管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
    <script type="text/javascript" src="sys/department/department.js"></script>
    <script type="text/javascript" src="<%=basePath%>resources/common/viewHistory.js"></script>
  </head>
  <body>
  	<div id="toolbar" style="height:auto;">
  	  <form action="" id="departmentSearchForm">
  		<table style="line-height:80px;">
		  	<tr align="left">
		  		<td width="100" align="right">组织编码:</td>
		  		<td width="100" align="left"><input type="text" class="easyui-textbox" id="searchDeptCode" data-options="prompt:'精确查询',validType:'maxLength[20]'"/></td>
		  		<td width="100" align="right">组织名称:</td>
		  		<td width="100" align="left"><input type="text" class="easyui-textbox"  id="searchDeptName" maxlength="10" data-options="prompt:'模糊查询',validType:'maxLength[20]'"/></td>
		  	</tr>
		</table>
	 </form>
	    <div style="margin-left: -2px;margin-right: -2px;" class="toolbuttonbg"> 
	    	<a href="javaScript:addDepartment();" name="department_add" style="float:left;" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
	        <div class="datagrid-btn-separator"></div>
	    	<a href="javaScript:editDepartment();" name="department_editor" style="float:left;" class="easyui-linkbutton" iconCls="icon-edit" plain="true">编辑</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:delDepartment();" name="department_delete" style="float:left;" class="easyui-linkbutton" iconCls="icon-cancel" plain="true">删除</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" name="department_enable" style="float:left;" class="easyui-linkbutton" id="enableBtn" iconCls="icon-ok" plain="true">启用</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" name="department_disable" style="float:left;" class="easyui-linkbutton" id="disableBtn" iconCls="icon-no" plain="true">禁用</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:viewHistory('sys_department', 'departmentId');" name="department_viewhistory" style="float:left;" class="easyui-linkbutton" iconCls="icon-viewsdetail" plain="true">操作日志</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:refresh();" name="department_refresh" style="float:left;" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:query();" name="department_query" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
	    </div>
	</div>  
    <!-- 表格 -->
    <table id="dataGridTable" ></table>
    <!-- 新增修改表单dialog -->
    <div id="departmentEdit" iconCls="icon-save" style="width:400px;height:200px;">
       <div class="easyui-layout" fit="true">
	  	 <div region="center" border="false" class="uims-dialog">
	  		<form action="" id="departmentEditForm">
	  			<table class="fullTable">
	  				<tr>
	  					<td class="tr">上级组织:</td>
	  					<td >
	  						<input type="text" id="edit_department_parent_id" class="easyui-combotree" required="true"/>
	  					</td>
	  				</tr>
	  				<tr>
	  					<td class="tr">组织编码:</td>
	  					<td>
	  						<input type="text" style="width: 249" class="easyui-textbox" maxlength="40" data-options="required:true,missingMessage:'该输入项为必输项'" id="edit_department_code" ></input>
	  					</td>
	  				</tr>
	  				<tr>
	  					<td class="tr">组织名称:</td>
	  					<td>
	  						<input type="text" style="width: 249" class="easyui-textbox" maxlength="40" data-options="required:true,missingMessage:'该输入项为必输项'" id="edit_department_name" ></input>
	  					</td>
	  				</tr>
	  				<input type="hidden" id="edit_department_status" name="departmentstatus"/>
	  				<input type="hidden" id="edit_department_id" name="departmentId"/>
	  			</table>
	  		</form>
	  	</div>
	  </div>
    </div>
    <%@ include file="../../resources/common/page/viewHistory.jsp"%>
  </body>
</html>
<%@ include file="../../resources/common/page/button.jsp"%>